
from django.conf.urls import url, include
from django.contrib import admin
from rest_framework.routers import DefaultRouter

from goods import views
urlpatterns = [

    # 列表页面导航接口
    # category/1/
    url(r'^categories/(?P<pk>\d+)/$', views.CategoryView.as_view()),

    # 查询商品列表数据的路由
    url(r'^skus/$', views.SKUListView.as_view()),
]

# 创建全文检索的路由
router = DefaultRouter()
router.register('skus/search', views.SKUSearchViewSet,base_name='skus_search')
urlpatterns += router.urls